import request from '@/utils/request'

// 查询消息通知列表
export function listMessageInfo(query) {
  return request({
    url: '/business/messageInfo/list',
    method: 'get',
    params: query
  })
}

// 查询消息通知所有列表
export function listAllMessageInfo(query) {
  return request({
    url: '/business/messageInfo/listAll',
    method: 'get',
    params: query
  })
}

// 查询消息通知详细
export function getMessageInfo(id) {
  return request({
    url: '/business/messageInfo/getInfo/' + id,
    method: 'get'
  })
}

// 新增消息通知
export function addMessageInfo(data) {
  return request({
    url: '/business/messageInfo/add',
    method: 'post',
    data: data
  })
}

// 修改消息通知
export function updateMessageInfo(data) {
  return request({
    url: '/business/messageInfo/edit',
    method: 'post',
    data: data
  })
}

// 删除消息通知
export function delMessageInfo(id) {
  return request({
    url: '/business/messageInfo/remove/' + id,
    method: 'get'
  })
}

// 当前用户未读消息数量
export function getCurrNoReadCount() {
  return request({
    url: '/business/messageInfo/getCurrNoReadCount',
    method: 'get'
  })
}
